﻿<%@ Page Title="" Language="C#" MasterPageFile="~/ClientPage.Master" AutoEventWireup="true"
    CodeBehind="GuestBook.aspx.cs" Inherits="Aij1.GuestBook" %>

<%@ Register Src="UserControls/CtrlSpecialMenu.ascx" TagName="CtrlSpecialMenu" TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="chHead" runat="server">
    <style type="text/css">
        input, textarea { border: 1px solid #333; }
        
        .gnc { background: #efefef; padding: 6px; }
        
        .gn { font-size: 12px; }
        .gc { font-size: 14px; }
        
        .rnc { padding: 6px; }
        
        .rn { font-size: 12px; }
        .rc { font-size: 14px; }
        .d { font-size: 11px; color: #999999; font-family: Verdana, Arial, Helvetica, sans-serif; }
    </style>
</asp:Content>
<asp:Content ID="CT2" ContentPlaceHolderID="left" runat="server">
    <uc1:CtrlSpecialMenu ID="CSM" runat="server" FocusedId="11" />
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="cph" runat="server">
    <asp:Repeater ID="R" runat="server">
        <ItemTemplate>
            <div class="gnc">
                <div class="gn">
                    <b>
                        <%#Eval("GuestName")%></b> 于 <span class="d">
                            <%#Eval("WriteTime","{0:yyyy-MM-dd HH:mm}")%></span> 发表留言:</div>
                <div class="gc">
                    <%#CommOp.ToHtmlStr(Eval("Content")) %>
                </div>
            </div>
            <div class="rnc" style='display: <%# CommOp.ToDateTime(Eval("ReplyTime")) == default(DateTime)?"none":"" %>'>
                <div class="rn">
                    <%#Eval("Replyer")%>
                    于 <span class="d">
                        <%#Eval("ReplyTime","{0:yyyy-MM-dd HH:mm}")%></span> 回复:</div>
                <div class="rc">
                    <%#CommOp.ToHtmlStr(Eval("Reply"))%></div>
            </div>
            <div style="height: 1em;">
            </div>
        </ItemTemplate>
    </asp:Repeater>
    <div class="pageno">
        <%=WPager%></div>
    <table width="100%" border="0" align="center" cellpadding="0" cellspacing="2" style="font-size: 12px;">
        <tr>
            <td height="25">
                留言内容：
            </td>
            <td height="25">
                <textarea name="Content" cols="55" rows="5"></textarea><span class="red">*</span>
            </td>
        </tr>
        <%if (CurrentCustomer == null)
          { %>
        <tr valign="middle">
            <td>
                &nbsp;
            </td>
            <td>
                您在登录后才能发表留言，谢谢！
                <input type="image" style="width: 120px; height: 24px; border: 0" src="http://qzonestyle.gtimg.cn/qzone/vas/opensns/res/img/Connect_logo_3.png"
                    onclick="loginToQQ();return false;" />
            </td>
        </tr>
        <%}
          else
          { %>
        <tr>
            <td height="30">
            </td>
            <td>
                <input name="cmdOk" type="submit" value="提交留言" onclick="return check()" />
                <input name="cmdReset" type="reset" value="重新填写" />
            </td>
        </tr>
        <%} %>
    </table>
    <script type="text/javascript">
        function check() {
            var myfrm = document.forms[0];
            if (myfrm.Content.value.length < 5) {
                alert('内容太短。');
                myfrm.Content.focus();
                return false;
            }
            return true;
        }
    </script>
</asp:Content>
